% Note: 
%   1. QW is the predetermined pre-exit distribution of households.
%      1.1 Both Exiting HH and Surviving HH are consuming and working.
%      1.2 Entrant only matters for asset choice, it can be understood as:
%      they inheritate the asset from the exit households, whose asset
%      allocation choice is forced to be bp=0.
%   2. QWp = TrMat_bp*(1-XI)*QW+XI*QW_Entrant
%   3. The distribution of Exit firms is: XI*QW
function Dist_Hist=SteadyState_Distribution(PP,SS)

%% Preliminaries
QW_fzo      =   MarkovChain_InvDist(SS.TrProb.CoefMat,SS.TrProb.FlowVec);

MarginQW    =   struct();
UnitNum     =   [SS.DistApp.fzo.UnitNum(1),PP.ExoState.IdioInc.N,PP.ExoState.Idio_FI.N,PP.ExoState.Idio_RI.N];
DimList     =   {[1],[2],[3],[4], ...
                 [1,2],[1,3],[1,4],[2,3],[2,4],[3,4]};
NameList    =   {'f','z','FI','RI',...
                 'f_z','f_FI','f_RI','z_FI','z_RI','FI_RI'};

for dd=1:length(DimList)
    vv                  =   NameList{dd};
    MarginQW.(vv)       =   DistApp_Hist_MergeQW2Marginal(UnitNum,DimList{dd},QW_fzo,'Matrix');
end

Dist_Hist   =   struct('QW_fzo',QW_fzo,...
                       'Marginal_fzo',MarginQW);